#include <stdio.h>
#include <math.h>

int n;

typedef struct point
{
   int x,y,z;
} point;

double cout = 0;

int quicksort(int *arr[], int n)
{
    int temp = arr[0][3];
    for (int i = 0; i < n; i++)
    {
        if (arr[i][3] > temp)
        {
            for (int j = n; j > i; j--)
            {
                if (arr[j][3] < temp)
                {
                    int *a = arr[i];
                    arr[i] = arr[j];
                    arr[j] = *a ;
                }
                
            }
        }
    }
}

int main(void)
{

    scanf("%d", &n);
    int *p;
    // p = point[0];
    for (int i = 0; i < n; i++)
    {
        scanf("%d %d %d", &p[0], &p[1], &p[2]);
        // if(z[i] - z[i-1]<0 &&i>1) break;
        // cout += sqrt(pow((x[i]- x[i-1]),2) + pow((y[i]- y[i-1]),2) + pow((z[i]- z[i-1]),2)) ;
    }

    printf("%.3f", cout);
}
